<div class="page-title" style="z-index: 780;">
    <div class="in" style="z-index: 770;">
        <div class="titlebar" style="z-index: 760;">	
            <h2>{$langs.HEADING_NEW_EMAILTEMPLATE}</h2>	
        </div>
    </div>

</div>

<div class="content" style="z-index: 730;">
    {include file="$_TEMPLATE_SOURCE_DIR/modules/validate_error.tpl" }
    <form action="{dev_get_admin_page_link page=PAGE_EMAILTEMPLATE_NEW}" method="post" name="frmNew" >
        <input type="hidden"  name="action" value="process" />
        <table class="form" >	
            <tr>
                <td>{$langs.TEXT_EMAILTEMPLATE_KEY}</td>
                <td><input name="emailtemplate_key" type="text" id="emailtemplate_key" value="{$emailtemplate_key}" size="30"></td>
            </tr>
            <tr>
                <td>{$langs.TEXT_EMAILTEMPLATE_STATUS}</td>
                <td>{html_radios name="emailtemplate_status" options=$status_options selected=$emailtemplate_status separator="<br /><br />"}</td>
            </tr>    
            <tr>
                <td>{$langs.TEXT_EMAILTEMPLATE_IS_HTML_EMAIL}</td>
                <td>{html_radios name="is_html_email" options=$yesno_status_options selected=$is_html_email separator="<br /><br />"}</td>
            </tr>   	  
            <tr><td colspan="2">
                    <ul id="infotabs" class="shadetabs">
                        {section name=languageidx loop=$languages}	
                        <li><a href="#" rel="language{$languages[languageidx].id}" {if languageudx==0} class="selected" {/if} ><img src="{dev_get_image_source name=$languages[languageidx].image}"  alt="{$languages[languageidx].name}" border="0"/></a></li>
                        {/section}		
                    </ul>

                    <div style="border: 1px solid green; padding: 10px; width: 100%; margin-bottom: 1em;">
                        {section name=languageidx loop=$languages}	
                        {assign var="langid" value=$languages[languageidx].id}
                        <div style="display: none;" id="language{$langid}" class="tabcontent">
                            <table width="100%" border="0"  cellpadding="2" cellspacing="5">
                                <tr>
                                    <td class="main"  width="120">{$langs.TEXT_EMAILTEMPLATE_TITLE}*</td>
                                    <td><input name="emailtemplates_title[{$langid}]" type="text" value="{$emailtemplates_title[$langid]}" size="30"  /></td>
                                </tr>
                                <tr><td class="main"  width="120">{$langs.TEXT_EMAILTEMPLATE_SUBJECT}*</td>
                                    <td><input name="emailtemplates_subject[{$langid}]"  type="text" value="{$emailtemplates_subject[$langid]}" size="100"  /></td>
                                </tr>

                                <tr><td class="main">{$langs.TEXT_EMAILTEMPLATE_CONTENT}</td>
                                    <td><textarea name="emailtemplates_content[{$langid}]" id="wysiwyg" cols="100" rows="15" >{$emailtemplates_content[$langid]}</textarea></td>
                                </tr>
                                <tr><td class="main">{$langs.TEXT_EMAILTEMPLATE_USAGE}</td>
                                    <td><textarea name="emailtemplates_usage[{$langid}]" cols="80" rows="5" id="emailtemplates_usage[{$langid}]"  >{$emailtemplates_usage[$langid]}</textarea></td>
                                </tr>
                            </table>
                        </div>
                        {/section}
                    </div>
                </td></tr>

            <tr>
                <td>&nbsp;</td>
                <td>
                    <input type="submit" name="Submit" value="{$BUTTON_SUBMIT}" class="st-button">
                    <input type="button" name="btnCancel" value="{$BUTTON_CANCEL}" onClick="window.location	='{$back_link}';" class="st-clear">
                </td>
            </tr>
        </table>
    </form>	
</div>
{literal}
<script type="text/javascript">
    var infos=new ddtabcontent("infotabs")
    infos.setpersist(true)
    infos.setselectedClassTarget("link") //"link" or "linkparent"
    infos.init()
</script>
{/literal}